home *** CD-ROM | disk | FTP | other *** search
- /*
- * $RCSfile: disk.h,v $
- * $Revision: 1.1.1.1 $
- * $Date: 1996/05/04 21:55:42 $
- */
- #ifndef __DISK_H__
- #define __DISK_H__
-
- /**********************************************************************
- * EXODUS Database Toolkit Software
- * Copyright (c) 1991 Computer Sciences Department, University of
- * Wisconsin -- Madison
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
- * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.
- * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * The EXODUS Project Group requests users of this software to return
- * any improvements or extensions that they make to:
- *
- * EXODUS Project Group
- * c/o David J. DeWitt and Michael J. Carey
- * Computer Sciences Department
- * University of Wisconsin -- Madison
- * Madison, WI 53706
- *
- * or exodus@cs.wisc.edu
- *
- * In addition, the EXODUS Project Group requests that users grant the
- * Computer Sciences Department rights to redistribute these changes.
- **********************************************************************/
-
-
- typedef struct {
-
- long bufIndex; /* offset from beginning of shared memory*/
- long length; /* number of bytes to read/write */
-
- } DISKIOVEC;
-
- /* max number of pages in one disk request */
- #define MAX_DISK_IOVEC 8
-
- /*
- * message type for disk requests
- */
- typedef struct {
-
- VOLID volid;
- int threadId;
- FLAGS flags;
- long offset; /* offset from beginning of disk */
-
- /* vector of pages to read/write */
- DISKIOVEC diskVec[MAX_DISK_IOVEC];
- int diskVecCount; /* size of diskVec */
-
- } DISKBODY;
-
-
- /*
- * define the universal header type
- */
- typedef struct {
-
- MSGHDR header;
- #define diskmagic header.version
- DISKBODY body;
-
- } DISKMSG;
-
-
- /*
- * define a magic number for the disk message type
- */
- #define DISK_MESSAGE_MAGIC ((SHORT_MAGIC)0xfa50)
-
- /*
- * define the types of messages to the disk process
- */
- #define OPEN_DISK 1
- #define CLOSE_DISK 2
- #define READ_BLOCK 3
- #define WRITE_BLOCK 4
- #define DUMP_MON 5
- #define FSYNC_DISK 6
-
- #endif __DISK_H__
-